import RouteItem from './RouteItem'
import { Route, Redirect, Switch } from 'react-router-dom';
import React, { Component } from 'react';

const RenderRoute = (routes, basePath = "") => (
    routes.map((route, index) => {
        return (
            <Route key={index} path={basePath + route.path} render={props => (
                <RouteItem {...route} {...props} />
            )}
            />
        )
    })
)

export default RenderRoute
